import http from './http';

export const doctorAPI = {
  // 登录
  login: (username: string, password: string) => http.post('/doctor/login', { username, password }),

  // 查询患者列表
  getPatientList: () => http.get('/doctor/patients'),

  // 查询指定患者详情
  getPatientDetail: (id: string) => http.get(`/doctor/patient/${id}`),

  // 查询病历列表
  getEMRList: (patientId: string) => http.get(`/doctor/emrs?patientId=${patientId}`),

  // 获取病历详情
  getEMRDetail: (emrId: string) => http.get(`/doctor/emr/${emrId}`),

  // 保存/编辑病历
  saveEMR: (data: any) => http.post('/doctor/emr', data),

  // 预约管理
  getAppointments: () => http.get('/doctor/appointments'),

  // 其他业务API可继续扩展
};
export type DoctorAPI = typeof doctorAPI;
